<?php

namespace App\Http\Controllers\Api\V1\Resources;

use Illuminate\Http\Resources\Json\JsonResource;

class CouponRecordsResource extends JsonResource
{
    public function toArray($request)
    {
    	$resource = $this->resource;
    	
        return [
        	'id' => (int)$resource->id,
	        'code' => $resource->code,
	        'coupon' => $resource->coupon,
	        'status' => (string)$resource->status,
	        'used_at' => (string)$resource->used_at,
	        'created_at' => (string)$resource->created_at,
        ];
    }
}
